<?php
namespace app\mobile\controller;

use app\mobile\model\Config;
use think\Controller;
use think\Cookie;
use think\Request;
use think\Session;
use think\Url;

class BaseController extends Controller
{
    protected $member_id;
    protected $back_url;
//    protected $beforeActionList = [
//        'is_avoid_login'    =>  ['except'=>'login,check_bind_tel,get_code,register,index,getVerif'],
//        'is_avoid_login'    =>  ['only'=>'sign_in,get_ticket,ticket_act,self_information,edit_nickname'],
//    ];
    /*
     * 用户登录是否选择免登陆
     */
//    protected function is_avoid_login(){
        //登录时根据是否勾选免登陆,设置或删除cookie
//        if (Cookie::has('member_id')){
//            $this->member_id = Cookie::get('member_id');
//        }else{
            //session失效
//            if (!Session::has('member_id')){
//                $this->error('请登录',Url::build('mobile/user_port/login'));
//            }
//            $this->member_id = Session::get('member_id');
//        }
//    }
    /*
     * 初始化
     */
    public function _initialize()
    {

    }
}